package com.muyu.remote;

import com.muyu.common.core.constant.ServiceNameConstants;
import com.muyu.common.core.domain.Result;
import com.muyu.remote.factory.RemotePayFactory;
import com.muyu.system.danmo.dto.PayDTO;
import com.muyu.system.danmo.vo.PayVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author Administrator
 */
@FeignClient(
        contextId = "PayFeign01",
        value = ServiceNameConstants.PAY_SERVICE,

        fallbackFactory = RemotePayFactory.class,
        path = "/open/api"
)
public interface PayFeign {

    /**
     * 支付
     * @param payDTO
     * @return
     */
    @PostMapping("/pay")
    Result<PayVO> pay(@RequestBody PayDTO payDTO);

}
